"""
    基础的精灵块管理组
"""
import pygame


class BaseGroup(pygame.sprite.Group):
    def __init__(self, *sprite, hide = False):
        super().__init__(*sprite)

        if hide:
            self.hide()

    def __str__(self):
        return f"BaseGroup len[{len(self)}]"

    def show(self):
        for sprite in self.sprites():
            sprite.is_show = True

    def hide(self):
        for sprite in self.sprites():
            sprite.is_show = False